/* 
 * File:   arrays.h
 * Author: Patrick W. M. Adams
 * Institution: Astrophysics, Cosmology and Gravity Centre,
 *              Department of Mathematics and Applied Mathematics,
 *              University of Cape Town
 *
 * Created on 13 March 2012, 4:04 AM
 */

#ifndef ARRAYS_H
#define	ARRAYS_H

//#include <vector>
#include <iostream>

//class Arrays
class Arrays{
    
public:
    
    Arrays();//constructor
    Arrays(unsigned int, unsigned int, unsigned int);//constructor
    Arrays(unsigned int, unsigned int, unsigned int, unsigned int);//constructor
    Arrays(const Arrays&); //copy constructor
    ~Arrays(); //default destructor
    
    unsigned int getArraysDim(unsigned int); //return size of a particular array
                                             //dimension
    
    void inflateA();
    void inflateRho();
    void inflateVel();
    void inflateS();
    void inflatePhi();
    void inflateT();
    void inflateXarr(int, int);
    void inflateYarr(int, int);
    void inflateZarr(int, int);
    void inflateTarr(int);
    
    Arrays& operator=(const Arrays&); //operator= overload
    //friend class Deriv;
    //friend class Deriv1; 
    //friend class Deriv2;
    //friend class Div;
    //friend class Div2;
    //friend class Grad; 
    //friend class Curl; 
    //friend class Curl2;
    friend class Simulation;
    friend class Induction;
    friend class Hydro;
    friend class Entropy;
    
private:
    
    unsigned int xDimSize, yDimSize, zDimSize, wDimSize, nsteps; //obvious
    //some sum thing, explained in Pencil Code doc pg 85(99) ???
    //defined as: wDimSize = mvar+maux+mglobal+mscratch; mvar is the number of
    //real PDE variables (wtf?! these people don't explain this crap!)
    
    //std::vector<std::vector<std::vector<std::vector<double> > > > array;
                                //4-d vector to represent the array
    int Lx, Ly, Lz; //x-, y- and z-lengths
    double h, dt, tmax; //spatial step size, temporal step size, max time
    double *xaxis, *yaxis, *zaxis, *taxis;
    double ***rho, ***s, ***T, ***Phi, ****vel, ****A; //4-d array as in Pencil
    
};//end class Arrays

#endif	/* ARRAYS_H */

